import { HttpClient } from "@angular/common/http";
import { Injectable, Injector } from "@angular/core";
import { Observable } from "rxjs";
import { BaseServices } from "src/app/services/base.services";
import { IncomeData } from "../type";


@Injectable({
    providedIn: 'root',
})
export class GeneralSituationServices extends BaseServices {

  constructor(public injector: Injector,private http:HttpClient) {
    super(injector);
  }

  geIncometData(type:string): Observable<{ code: number, data: IncomeData }> {
    return this.http.post<{ code: number, data: IncomeData }>(`/api/getData`,{body:{type}})
  }
}